package com.jdd.modules.sdk.utils;

import com.jdd.common.constant.JddConstant;

import java.util.Properties;

/**
 * @author ：jdd孙庆伟
 * @date ：Created in 2021/8/4 15:44
 * @description：判断当前系统是linux还是Windows
 * @modified By：`
 * @version: 1.0
 */
public class CheckSystemUtil {
    public static String checkSystem() {
        //判断是windows 还是linux
        Properties prop = System.getProperties();
        String os = prop.getProperty("os.name");
        String system = "";
        if (os != null && "Linux".equals(os)) {
            system = JddConstant.SystemType.LINUX_SYSTEM;
        } else {
            system = JddConstant.SystemType.WINDOWS_SYSTEM;
        }
        return system;
    }

}
